package com.xiaocg.command;

import java.util.Map;

public class OrderCommand implements CommandDemo{

    private Chef chef;
    private OrderInfo info;

    public OrderCommand(Chef chef, OrderInfo info) {
        this.chef = chef;
        this.info = info;
    }

    @Override
    public void execute() {
        Map<String, Integer> foods = info.getFoods();
        for (String s: foods.keySet()) {
            chef.makeFood(s,foods.get(s));
            System.out.println(info.getNumber()+"桌的饭已经准备完毕");
        }

    }
}
